
/** 
 * 相当于确定了长度的list
 */
(int, String, double) record = (0, 'lammu', 95.5); 
/**
 * 相当于确定key的的object
 * 注意类型写在变量前面
 */
({String id, String name, double? price}) record_2 = (id: '1244568234235', name: 'iphone se4', price: null);

/** 
 * 还可以混用
 * 一般把必要的放前面, 选项放后面?
 */
(int, double, {int age, String name}) record_3 = (0, name: 'chen', 95.5, age: 24);


void main() {

  /** 可以通过下标取值 */
  print(record.$2);

  var (index, name, score) = record;
  print('index=$index, name=$name, score=$score');


  /** .$2 是分数, 而不是name */
  print('\$1=${record_3.$1}, \$2=${record_3.$2}, name=${record_3.name}');
}